// store/modules/ui.js
export default {
    namespaced: true,
    state: () => ({
        currentTab: 0,
        tabs: [
            { title: '进行中', icon: '/static/img/order1.png' },
            { title: '待付款', icon: '/static/img/order2.png' },
            { title: '待评价', icon: '/static/img/order3.png' },
            { title: '待使用', icon: '/static/img/order4.png' }
        ]
    }),
    mutations: {
        SET_CURRENT_TAB(state, index) {
            state.currentTab = index;
        }
    },
    actions: {
        switchTab({ commit }, index) {
            commit('SET_CURRENT_TAB', index);
        }
    }
};
